package com.itheima_07;

import java.util.Scanner;

public class StringAmount {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入一个字符串");
        String line = sc.nextLine();

        //设计三个计数器
        int bigCount = 0;
        int smallCount = 0;
        int numberCount = 0;

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);

            if (c >= 'a' && c <= 'z') {
                smallCount += 1;
            } else if (c >= 'A' && c <= 'Z') {
                bigCount += 1;
            } else if (c >= '0' && c <= '9') {
                numberCount += 1;
            }
        }
        System.out.println("大写字符个数" + bigCount);
        System.out.println("小写字符个数" + smallCount);
        System.out.println("数值字符个数" + numberCount);
    }
}
